import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import Permission from "./views/auth/Permission";
import Role from "./views/auth/Role";
import Role2 from "./views/auth/Role2";
import Menu from "./views/auth/Menu";
import Menu2 from "./views/auth/Menu2";
import NoPermission from "./views/403"
import Config from "./views/sys/Config";
import Dictionary from "./views/sys/Dictionary";
import Dictionaryitem from "./views/sys/Dictionaryitem";
import Product from "./views/prod/Product";
import ProductType from "./views/prod/ProductType";

import Activity  from "./views/mkt/Activity";
import ActivityRemark from "./views/mkt/ActivityRemark";
import Business from "./views/mkt/Business";
import BusinessProduct from "./views/mkt/BusinessProduct";
import BusinessRemark from "./views/mkt/BusinessRemark";
import Clue from "./views/mkt/Clue";
import ClueRemark from "./views/mkt/ClueRemark";
import Order from "./views/order/Order";

import Customer from "./views/customer/Customer";
import Guarantee from "./views/guarantee/Guarantee";
import GuaranteeItem from "./views/guarantee/GuaranteeItem";
import Contract from "./views/contract/Contract";
import ContractRemark from "./views/contract/ContractRemark";
let routes = [
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf:true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/403',
        component: NoPermission,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Department', component: Department, name: '部门管理' },
            { path: '/Employee', component: Employee, name: '员工管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Permission', component: Permission, name: '权限列表' },
            { path: '/Role', component: Role, name: '角色管理' },
            { path: '/Role2', component: Role2, name: '角色管理2' },
            { path: '/Menu', component: Menu, name: '菜单管理' },
            { path: '/Menu2', component: Menu2, name: '菜单管理2' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Config', component: Config, name: '系统配置' },
            { path: '/Dictionary', component: Dictionary, name: '字典管理' },
            { path: '/Dictionaryitem', component: Dictionaryitem, name: '字典信息' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Product', component: Product, name: '产品管理' },
            { path: '/ProductType', component: ProductType, name: '产品类型' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Activity', component: Activity, name: '活动管理' },
            { path: '/ActivityRemark', component: ActivityRemark, name: '活动备注' },
            { path: '/Business', component: Business, name: '商机管理' },
            { path: '/BusinessProduct', component: BusinessProduct, name: '商机产品管理' },
            { path: '/BusinessRemark', component: BusinessRemark, name: '商机备注' },
            { path: '/Clue', component: Clue, name: '线索管理' },
            { path: '/ClueRemark', component: ClueRemark, name: '线索备注' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Order', component: Order, name: '订单管理' },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '客户管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Customer', component: Customer, name: '客户管理' },
        ]
    },

    {
        path: '/',
        component: Home,
        name: '售后管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Guarantee', component: Guarantee, name: '售后单' },
            { path: '/GuaranteeItem', component: GuaranteeItem, name: '售后单明细' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '合同管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Contract', component: Contract, name: '合同列表' },
            { path: '/ContractRemark', component: ContractRemark, name: '合同备注' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '导航一',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/table', component: Table, name: 'Table' },
            { path: '/form', component: Form, name: 'Form' },
            { path: '/user', component: user, name: '列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '导航二',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/page4', component: Page4, name: '页面4' },
            { path: '/page5', component: Page5, name: '页面5' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,// 叶子 只有一个节点没有其他的节点了
        children: [
            { path: '/page6', component: Page6, name: '导航三' }
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;